package cn.edu.scau.cmi.chenjieling.abstractFactory;

public abstract class CompanyFactory {
	public static final String  PICC = "PICC";
	public static final String PingAn = "PingAn";
	public abstract BodyInjur getBody();
	public abstract CarDamage getCarDam();
	public abstract PersonInjur getPerson();
	public abstract Comprehensive getCom();
	public static CompanyFactory getCompanyFactory(String type) {
		CompanyFactory cf = null;
		if(type.equals(CompanyFactory.PICC)) {
			cf = new PICCFactory();
		}
		else if(type.equals(CompanyFactory.PingAn)) {
			cf = new PingAnFactory();
		}
		return cf;
	}
}
